package com.sphd.restaurantsystem.adapters;

import android.text.TextUtils;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.sphd.restaurantsystem.R;
import com.sphd.restaurantsystem.info.ManagerInfo;

import java.util.List;

/**
 * Created by Hu on 2016/11/8.
 */

public class ManagerAdapter extends BaseQuickAdapter<ManagerInfo> {
    public ManagerAdapter(int layoutResId, List<ManagerInfo> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder baseViewHolder, ManagerInfo managerInfo) {
        baseViewHolder.setText(R.id.dianming, TextUtils.isEmpty(managerInfo.getCg_name())?"待编辑":managerInfo.getCg_name())
                .setText(R.id.username,TextUtils.isEmpty(managerInfo.getStaff_name())?"待编辑":managerInfo.getStaff_name())
                .setText(R.id.phonename,TextUtils.isEmpty(managerInfo.getStaff_phone())?"待编辑":managerInfo.getStaff_phone());
    }
}
